﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/adminMasterPage.master" AutoEventWireup="true" CodeFile="editUser.aspx.cs" Inherits="admin_editUser" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"><div class="Body_Title">
    系统信息管理 》》用户管理</div>

<asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
    AutoGenerateColumns="False" DataSourceID="SqlDataSourceUser" 
     DataKeyNames="zID" EnableModelValidation="True">
    <Columns>
        <asp:BoundField DataField="zID" HeaderText="自动编号" SortExpression="zID" 
            InsertVisible="False" ReadOnly="True" />
        <asp:BoundField DataField="u_LoginName" HeaderText="登录名" 
            SortExpression="u_LoginName" />
        <asp:BoundField DataField="u_Name" HeaderText="用户姓名" 
            SortExpression="u_Name" />
        <asp:BoundField DataField="c_Name" HeaderText="用户类型" 
            SortExpression="c_Name" />
        <asp:CommandField HeaderText="编辑" ShowEditButton="True" />
        <asp:CommandField HeaderText="删除" ShowDeleteButton="True" />
    </Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSourceUser" runat="server" 
    ConnectionString="<%$ ConnectionStrings:LabInfoManageSystemConnectionString %>"     
        SelectCommand="SELECT userInfo.zID, userInfo.u_LoginName, userInfo.u_Name, userInfo.u_password, userInfo.u_class, classInfo.c_Name FROM userInfo INNER JOIN classInfo ON classInfo.cID = userInfo.u_class" 
        DeleteCommand="DELETE FROM userInfo WHERE (zID = ?)" 
        
        UpdateCommand="UPDATE userInfo SET u_LoginName =?, u_Name =?, u_class =?  WHERE (zID = ?)">    
    </asp:SqlDataSource>
</asp:Content>

